package com.hongning.railway.ui.main.fragments.threesessionsandonelesson;

import android.arch.lifecycle.ViewModelProviders;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import com.hongning.railway.BR;
import com.hongning.railway.R;
import com.hongning.railway.app.AppViewModelFactory;
import com.hongning.railway.databinding.ActivityThreesessionsandonelessonMsgBinding;
import com.hongning.railway.entity.reqbean.MettingMessageBean;

import me.goldze.mvvmhabit.base.BaseFragment;

public class ThreesessionSanDoneLessonMsgFragment extends BaseFragment<ActivityThreesessionsandonelessonMsgBinding,ThreesessionSanDoneLessonMsgViewModel> {
    @Override
    public int initContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return R.layout.activity_threesessionsandonelesson_msg;
    }

    @Override
    public int initVariableId() {
        return BR.msgViewModel;
    }

    @Override
    public void initData() {
        super.initData();
        MettingMessageBean mettingMessageBean=new MettingMessageBean();
        mettingMessageBean.setPagenum(String.valueOf(1));
        mettingMessageBean.setPagesize("10000");
        viewModel.initDatas(mettingMessageBean);
    }

    @Override
    public ThreesessionSanDoneLessonMsgViewModel initViewModel() {
        AppViewModelFactory appViewModelFactory = AppViewModelFactory.getInstance(getActivity().getApplication());
        return ViewModelProviders.of(this,appViewModelFactory).get(ThreesessionSanDoneLessonMsgViewModel.class);
    }
}
